package cn.szzsi.interceptor;

import cn.szzsi._Config;
import cn.szzsi.common.kit.SystemConfigUtil;
import cn.szzsi.common.model.SiteConfig;
import cn.szzsi.common.model.zshop.PlateformConfig;
import com.jfinal.aop.Interceptor;
import com.jfinal.aop.Invocation;
import com.jfinal.core.Controller;
import com.jfinal.kit.StrKit;

public class CommonPcInterceptor implements Interceptor {

	public void intercept(Invocation ai) {
	    Controller c = ai.getController();
        c.setAttr("base", c.getRequest().getContextPath());
        c.setAttr("weburl", _Config.p.get("mall_web.url"));
        PlateformConfig plateformConfig=PlateformConfig.dao.findFirst("select * from sys_plateform_config order by id");
        c.setAttr("plateformConfig",plateformConfig);
        c.setAttr("systemConfig", SystemConfigUtil.getSystemConfig());
        ai.invoke();
	}

}
